document.querySelectorAll('nav ul.nav-center a').forEach(link => {
  link.addEventListener('click', function (e) {
    e.preventDefault();

    const tragetID = this.getAttribute('href');
    const tragetSection = document.querySelector(tragetID);

    if(tragetSection){
      window.scrollTo({
        top: tragetSection.offsetTop - 80,
        behavior: 'smooth'
      });
    }
  });
});
document.querySelector('form').addEventListener('submit', function(e){
  e.preventDefault();
  alert('Thank you! Your message has been sent.');
  this.reset();
});